<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<input type="hidden" name="proposal/depart_code" id="depart_code" value="<x:out select="$xmlData/data/proposal/depart_code"/>">

<input type="hidden" name="proposal/recomend_org_type" id="recomend_org_type" value="<x:out select="$xmlData/data/proposal/recomend_org_type"/>">
<input type="hidden" name="proposal/sponsor_category_value" id="sponsor_category_value" value="<x:out select="$xmlData/data/proposal/sponsor_category_value"/>">
<input type="hidden" id="request_limit" name="proposal/request_limit" label="<x:out select="$xmlData/data/proposal/request_limit" />万元" value="<x:out select="$xmlData/data/proposal/request_limit" />">
<input type="hidden" id="type" name="type" value="proposal">
<input type="hidden" id="keyCode" name="keyCode" value="<iris:des3 code="${posCode}"></iris:des3>">				
<c:set var="grantCode"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
<input type="hidden" name="proposal/manage_category" value="<x:out select="$xmlData/data/proposal/manage_category" />" />
<input type="hidden" name="proposal/sub_grant_name" value="<x:out select="$xmlData/data/proposal/sub_grant_name" />" />
<input type="hidden" name="proposal/grant_code" value="<x:out select="$xmlData/data/proposal/grant_code" />" />  <input type="hidden" name="proposal/psn_code" value="<x:out select="$xmlData/data/proposal/psn_code" />" />
<input type="hidden" id="grant_no" name="proposal/grant_no" value="<x:out select="$xmlData/data/proposal/grant_no" />" />							
<input type="hidden" name="proposal/sub_grant_code" value="<x:out select="$xmlData/data/proposal/sub_grant_code" />" />
<input name="proposal/register_area_code" type="hidden" value="<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/area_value" />" />
<input name="proposal/register_area_name" type="hidden" value="<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/area_name" />" />
<input type="hidden" id="sub_grant_no" name="proposal/sub_grant_no" value="<x:out select="$xmlData/data/proposal/sub_grant_no" />" />
<input type="hidden" name="proposal/help_grant_code" value="<x:out select="$xmlData/data/proposal/help_grant_code" />" />
<input type="hidden" id="help_grant_no" name="proposal/help_grant_no" value="<x:out select="$xmlData/data/proposal/help_grant_no" />" />
<c:set var="formCode"><x:out select="$xmlData/data/proposal/form_code" /></c:set>
<c:set var="nature_value"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/nature_value" /> </c:set>
<c:if test="${empty formCode}"><c:set var="formCode" value="${param.formCode}"></c:set></c:if>
<input type="hidden" name="proposal/form_code" value="${formCode}" />
<%-- <input type="hidden" name="proposal/request_amt" 	id="request_amt" value="<x:out select="$xmlData/data/proposal/request_amt"/>"> --%>
<input type="hidden" name="proposal/year" value="${year}" />
<%-- <input type="hidden" name="proposal/request_amt" 	id="request_amt" value="<x:out select="$xmlData/data/proposal/request_amt"/>"> --%>
<input type="hidden" name="proposal/tjbm_org_name" 	 value="<x:out select="$xmlData/data/proposal/tjbm_org_name"/>">
<input type="hidden" name="proposal/tjbm_org_value" 	 value="<x:out select="$xmlData/data/proposal/tjbm_org_value"/>">											
<input type="hidden" name="organizations/organization[0]@submit_org" value="1" >
<input type="hidden" name="organizations/organization[0]/org_code" value="<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_code"/>" >
<input type="hidden" name="organizations/organization[0]/org_name" value="<x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_name"/>" >

<script type="text/javascript"> 
var backFlag = false; //点击返回按钮和菜单标识 
//绑定浏览器离开事件 
$(window).unbind('beforeunload'); 
window.onbeforeunload = null; 
$(window).bind('beforeunload',function(e){ 
e = window.event || e; 
//排除页面关闭、点击返回按钮和菜单刷新页面 
if(e.clientX > document.body.clientWidth && e.clientY < 0 || e.altKey || backFlag) { 
delCookie('posCode'); //设置Cookie过期 
}else{ 
var posCode = $("#posCode", "#mainForm").val(); 
if(!!posCode){ 
//新增申报书，保存后刷新，将posCose值传递过去，走编辑申报书 
setCookie('posCode', posCode, 60); 
} 
return '您输入的数据可能不会被保存。'; 
} 
}); 

window.onload = function(){ 
//刷新页面的时候清除没有保存的上传文件file_code值 
$("input[name$='/file_code']").each(function(){ 
var obj = $(this); 
var fileCode = obj.attr("name"); 
var fileName = fileCode.replace('file_code', 'file_name'); 
var fileNameVal = $("span[name='"+fileName+"']").text(); 
if(!$.trim(fileNameVal)) obj.val(''); 
}); 

$(".datepick-trigger").each(function(){ 
this.onclick = function(){ 
backFlag = true; 
} 
}); 
} 

$(function(){ 
$("#mainmenu_body").find("a[id^='menu']").each(function(){ 
this.onclick = function(){ 
backFlag = true; 
} 
}); 
}); 

$(function() {
	$("a[id^='content_downLoadFile']").each(function() {
		this.onclick = function() {
			backFlag = true;
		}
	});
});
</script>